last updated 960523 - for lastest info check out: http://www.glunet.se/qpict
File formats & JPEG Compression
Some terminology
JPEG is the compression algorithm for pictures. Different file formats can compress pictures by using JPEG algorithm e.g. Macintosh PICT file format, TIFF 6.0 format etc.
JFIF (JPEG File Interchange Format) is a file containing raw JPEG data and some other stuff. It's intended to be a way to interchange JPEG data between programs and computers.
To make things even more confusing, the filetype for JFIF files on the Macintosh is 'JPEG'.
About JPEG compression
JPEG is a destructive compression algorithm for pictures. It compresses pictures by removing data from the picture not visible by the human eye. It works in analogy with the audio compression used on the MiniDisc and DCC where approx. 80% of the music information can be removed without decreasing audio quality too much. JPEG compression works best with high quality 24 bit scanned pictures of reality scenes. In those cases you can gain a very large compression ratio without visible distortion in the picture. The JPEG compression doesn't work at all well with drawings and should not be used for that. One much discussed topic is the conversion of GIF-pictures to JPEG compressed pictures. The advise I have is to try it and see how the result is. The result can be quite good if the GIF file has high quality, but mostly there will be a visible degree of distortion in the picture.
QuickTime contains Apple's implementation of the JPEG compression algorithms along with the algorithms for motion picture. QuickTime doesn't use the JFIF file format. Instead it wrappes the JFIF file inside a PICT header. This has a very nice touch. It means that almost every program that can handle standard uncompressed PICT format files can also handle JPEG compressed PICT files without having to know anything about it. The sad thing is that QuickTime can't directly handle JFIF files, but it contains some functions that makes it able for easy conversion between JFIF and PICT.
There are many program that can compress pictures with JPEG compression (PhotoShop, GIFConverter etc.).
QPict accepts picture files in one of the following file formats:
• PICT - the standard Macintosh picture format. Can be compressed or uncompressed.
• SCRN - sometimes called startupscreen format. Is basicly the same as the PICT format but the picture data is stored in the resource fork of the file instead of the data fork.
• JFIF - This is the standard interchange format for JPEG compressed pictures. Pictures found on BBS, Internet and many CD-roms will likely have this format. If you plan to distribute pictures to any other computer system than the Macintosh be sure to convert your PICT-format files to JFIF.
On other computer system e.g. Dos, the filetype of each file is included in the filename, visible and editable for the user. On the Macintosh the filetype is hidden within the file not accessible without an editor. This causes problems for files that has its origin on other computer system than the Macintosh. In order for QPict to sort this out QPict accepts any kind of file dropped on QPict's icon in the Finder and checks each unknown filetype to see if it is a JFIF file. If it is a JFIF file it changes the filetype to 'JPEG' (the JFIF filetype on the Macintosh) and the creator to QPict.
If you are interested in compression algorithms and file formats here are some files you should get:
• jpeg-faq which can be found via ftp at:
rtfm.mit.edu
in directory
/pub/usenet/news.answers/jpeg-faq
This document contains a lot of useful information about JPEG compressing pictures, guide to programs on different computer systems that can handle JPEG.
• compression-faq which can be found via ftp at:
rtfm.mit.edu
in directory
/pub/usenet/news.answers/compression-faq
This document contains information of various compression algorithms, not just for image compression. It also contains some information of using fractals to compress pictures. Very interesting reading.